package br.feevale.jogo.util;

public enum CommandEnum {
	
	BTN_RAPOSA("00"),
	BTN_GANSO("01"),
	SETUP_RAPOSA("02"),
	SETUP_GANSO("03"),
	JOGADA("04"),
	BTN_PORTA("05"),
	FIM_JOGO("06");
	
	private String key;
	
	CommandEnum(String key) {
		this.key = key;
	}
	
	public String getKey() {
		return key;
	}
	
	public static CommandEnum getValue(String key) {
		CommandEnum command = null;
		
		if ("00".equals(key)) {
			command = BTN_RAPOSA;
		} else if ("01".equals(key)) {
			command = BTN_GANSO;
		} else if ("02".equals(key)) {
			command = SETUP_RAPOSA;
		} else if ("03".equals(key)) {
			command = SETUP_GANSO;
		} else if ("04".equals(key)) {
			command = JOGADA;
		} else if ("05".equals(key)) {
			command = BTN_PORTA;
		} else if ("06".equals(key)) {
			command = FIM_JOGO;
		} else {
			command = null;
		}
		
		return command;
	}
	
}
